<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 

class Links extends MY_Controller {
	
	function index() {
		$data = $this->getData('links');
		
		// get Links
		$sql = "SELECT val FROM ".$this->tblc." WHERE name LIKE ?";
		$query = $this->db->query($sql, array("links"));
		$res = $query->result();
		$d = array();
		if (count($res) > 0) {
			$d['links'] = json_decode($res[0]->val);	
		}
		
		
		$data["content"] = $this->load->view('links', $d, true);

		$this->load->view('layout', $data);
	}
}
?>
